import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import * as ElementPlusIconVue from "@element-plus/icons-vue";
import pinia from './store'
import "./style/style.css";
import "./style/global.scss";
// 路由守卫
import "./route-defend"
const app = createApp(App);
// 1. 全局注册 Element Plus 并配置国际化
app.use(ElementPlus, {
  locale: zhCn,
});
// 2. 注册 Element 图标库
for (const [key, component] of Object.entries(ElementPlusIconVue)) {
  app.component(key, component);
}
// 3. 注册路由
app.use(router);
// 4.注册仓库
app.use(pinia)
app.mount("#app");
